export function layoutViewGetter(state) {
	let arr = state.view.replace(/\s*/g,'').split('');
	let i = 0;
	let options = {
		top:{
			TL:{ model:'l', option:[{label:'l',value:'l'}, {label:'h',value:'h'}] },
			TC:{ model:'h', option:[{label:'h',value:'h'}, {label:'H',value:'H'}] },
			TR:{ model:'h', option:[{label:'r',value:'r'}, {label:'h',value:'h'}] },
		},
		middle:{
			ML:{ model:'L', option:[{label:'l',value:'l'}, {label:'L',value:'L'}] },
			MC:{ model:'p' },
			MR:{ model:'r', option:[{label:'r',value:'r'}, {label:'R',value:'R'}] },
		},
		bottom:{
			BL:{ model:'l', option:[{label:'l',value:'l'}, {label:'f',value:'f'}] },
			BC:{ model:'f', option:[{label:'f',value:'f'}, {label:'F',value:'F'}] },
			BR:{ model:'f', option:[{label:'r',value:'r'}, {label:'f',value:'f'}] },
		},
	};
	for (let y in options){
		if(options.hasOwnProperty(y)){
			let yo = options[y];
			for (let x in yo){
				if(yo.hasOwnProperty(x)){
					let xo = yo[x];
					xo.model = arr[i];
					i++;
				}
			}
		}
	}
	return options;
}
